package cn.krund.lyc.hotlerobot.activity.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.krund.lyc.hotlerobot.R;
import cn.krund.lyc.hotlerobot.activity.base.BaseActivity;
import cn.krund.lyc.hotlerobot.activity.view.GridSelectDialog;
import cn.krund.lyc.hotlerobot.widget.ZoomImageView;

/**
 * @包名: cn.krund.lyc.hotlerobot.activity.ui
 * @作者: 刘育成
 * @时间: 2018/3/30  18:33
 * @org: 克路德人工智能
 * @描述: TODO
 * @fileName: MappingPatternActivity
 */

public class MappingPatternActivity extends BaseActivity {

    @BindView(R.id.ziv_ShowMap)
    ZoomImageView mZivShowMap;
    @BindView(R.id.tv_map_name)
    TextView mTvMapName;
    private List<String> mDatas;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_mapping_pattern;
    }

    @Override
    protected void initView() {
        mDatas = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            mDatas.add("第" + i + "层");
        }
    }

    @Override
    protected void initNev() {

        mTvMapName.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                GridSelectDialog.Builder alter = new GridSelectDialog.Builder(MappingPatternActivity.this);
                alter.setListData(mDatas);
                alter.setSelectedListiner(new GridSelectDialog.Builder.OnSelectedListiner() {
                    @Override
                    public void onSelected(String info) {
                        mTvMapName.setText(info);
                    }
                });
                GridSelectDialog mDialog = alter.show();
                //设置Dialog 尺寸
                mDialog.setDialogWindowAttr(0.7, 0.9, MappingPatternActivity.this);
            }
        });
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    public void UploadImageOnClick(View view) {

    }

    public void MapBackHome(View view) {
        finish();
    }
}
